<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>折线图</title>
    <script src="../plugins/echarts/echarts.js"></script>
</head>
<body>
<div id="main" style="width: 600px;height:400px;"></div>
<script>
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '标题'
        },
        tooltip: {},
        legend: {
            data:['销量1']
        },
        xAxis: {
            data: ["2018-09","2018-10","2018-11","2018-12","2018-13","2018-14"]
        },
        yAxis: {},
        series: [{
            name: '销量1',
            type: 'line',
            data: [5, 6, 8, 10, 50, 20]
        }]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>